package com.cx.android;

import android.appwidget.AppWidgetManager; 
import android.content.Context; 
import android.content.Intent; 
import android.widget.RemoteViews; 
import android.widget.RemoteViewsService.RemoteViewsFactory; 

class Code1009AppWidgetRemoteViewsFactory implements RemoteViewsFactory 
{
    private final Context _context    ;         
    private final Intent  _intent     ;         
    private final int     _appWidgetId; 
    
    public Code1009AppWidgetRemoteViewsFactory(Context context, Intent intent) 
    {
        this._context    = context;                 
        this._intent      = intent;                 
        this._appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);         
    }

    public void onCreate() 
    {
    }

    public void onDestroy() 
    {
    }    

    //
    public void onDataSetChanged() 
    {
    }
    
    //
    public int getCount() 
    {
        return 0;
    }
    public int getViewTypeCount() 
    {
        return 1;
    }   
    
    public boolean hasStableIds() 
    {
        return true;
    }
    public RemoteViews getLoadingView() 
    {
    	// You can create a custom loading view (for instance when getViewAt() is slow. 
    	// If you return null here, you will get the default loading view.    	
        return null;
    }

    //
    public RemoteViews getViewAt(int position) 
    {
        final int   itemId = R.layout.lo_appwidget;
        RemoteViews views  = new RemoteViews(_context.getPackageName(), itemId);

        //final Intent code1009Intent = Code1009Intents.refreshWidgets(_context);
        //views.setOnClickFillInIntent(R.id.imageView1, code1009Intent);
        
        return views;
    }
    
    public long getItemId(int position) 
    {
        return 0;
    }    
}
